<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>shark::Data&lt; Type &gt; Class Template Reference</title>
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js"></script>
<script src="../../mlstyle.js"></script>
<link href="../css/besser.css" rel="stylesheet" type="text/css"/>
</head>
<!-- pretty cool: each body gets an id tag which is the basename of the web page  -->
<!--              and allows for page-specific CSS. this is client-side scripted, -->
<!--              so the id will not yet show up in the served source code -->
<script type="text/javascript">
    jQuery(document).ready(function () {
        var url = jQuery(location).attr('href');
        var pname = url.substr(url.lastIndexOf("/")+1, url.lastIndexOf(".")-url.lastIndexOf("/")-1);
        jQuery('#this_url').html('<strong>' + pname + '</strong>');
        jQuery('body').attr('id', pname);
    });
</script>
<body>
    <div id="shark_old">
        <div id="wrap">
            <div id="header">
                <div id="site-name"><a href="../../sphinx_pages/build/html/index.html">Shark machine learning library</a></div>
                <ul id="nav">
                    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/installation.html">Installation</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/tutorials/tutorials.html">Tutorials</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/benchmark.html">Benchmarks</a>
                    </li>
                    <li class="active">
                        <a href="classes.html">Documentation</a>
                        <ul>
                            <li class="first"></li>
                            <li><a href="../../sphinx_pages/build/html/rest_sources/quickref/quickref.html">Quick references</a></li>
                            <li><a href="classes.html">Class list</a></li>
                            <li class="last"><a href="group__shark__globals.html">Global functions</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<div id="doxywrapper">
<!--
    <div id="global_doxytitle">Doxygen<br>Documentation:</div>
-->
    <div id="navrow_wrapper">
<!-- Generated by Doxygen 1.9.8 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceshark.html">shark</a></li><li class="navelem"><a class="el" href="classshark_1_1_data.html">Data</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="classshark_1_1_data-members.html">List of all members</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-types">Protected Types</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="#friends">Friends</a>  </div>
  <div class="headertitle"><div class="title">shark::Data&lt; Type &gt; Class Template Reference</div></div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="classshark_1_1_data.html" title="Data container.">Data</a> container.  
 <a href="classshark_1_1_data.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_dataset_8h_source.html">shark/Data/Dataset.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for shark::Data&lt; Type &gt;:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classshark_1_1_data__inherit__graph.png" border="0" usemap="#ashark_1_1_data_3_01_type_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="ashark_1_1_data_3_01_type_01_4_inherit__map" id="ashark_1_1_data_3_01_type_01_4_inherit__map">
<area shape="rect" title="Data container." alt="" coords="186,78,327,104"/>
<area shape="rect" href="classshark_1_1_unlabeled_data.html" title=" " alt="" coords="375,5,522,46"/>
<area shape="poly" title=" " alt="" coords="310,70,386,44,387,49,312,75"/>
<area shape="rect" href="classshark_1_1_unlabeled_data.html" title=" " alt="" coords="375,71,522,111"/>
<area shape="poly" title=" " alt="" coords="342,88,375,88,375,94,342,94"/>
<area shape="rect" href="classshark_1_1_unlabeled_data.html" title=" " alt="" coords="375,136,522,177"/>
<area shape="poly" title=" " alt="" coords="312,107,387,133,386,138,310,112"/>
<area shape="rect" href="classshark_1_1_i_serializable.html" title="Abstracts serializing functionality." alt="" coords="5,78,138,104"/>
<area shape="poly" title=" " alt="" coords="153,88,185,88,185,94,153,94"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:ga79217da1dd034aa18bc553f483e9449c" id="r_ga79217da1dd034aa18bc553f483e9449c"><td class="memItemLeft" align="right" valign="top">typedef batch_type &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga79217da1dd034aa18bc553f483e9449c">batch_reference</a></td></tr>
<tr class="separator:ga79217da1dd034aa18bc553f483e9449c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab8037000e57c8d73273e1323ec2efe72" id="r_gab8037000e57c8d73273e1323ec2efe72"><td class="memItemLeft" align="right" valign="top">typedef batch_type const  &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#gab8037000e57c8d73273e1323ec2efe72">const_batch_reference</a></td></tr>
<tr class="separator:gab8037000e57c8d73273e1323ec2efe72"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga976b21a33c3947dde673463e2aa19597" id="r_ga976b21a33c3947dde673463e2aa19597"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structshark_1_1_batch.html">Batch</a>&lt; element_type &gt;::reference&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga976b21a33c3947dde673463e2aa19597">element_reference</a></td></tr>
<tr class="separator:ga976b21a33c3947dde673463e2aa19597"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9c2ebc84cb3ca390c09b6d4e32d5e7f6" id="r_ga9c2ebc84cb3ca390c09b6d4e32d5e7f6"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structshark_1_1_batch.html">Batch</a>&lt; element_type &gt;::const_reference&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga9c2ebc84cb3ca390c09b6d4e32d5e7f6">const_element_reference</a></td></tr>
<tr class="separator:ga9c2ebc84cb3ca390c09b6d4e32d5e7f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3765fd3c920db97545a11dca09b75224" id="r_ga3765fd3c920db97545a11dca09b75224"><td class="memItemLeft" align="right" valign="top">typedef std::vector&lt; std::size_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga3765fd3c920db97545a11dca09b75224">IndexSet</a></td></tr>
<tr class="separator:ga3765fd3c920db97545a11dca09b75224"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga19638bd1cc1a7c7c5698a476b36b9753" id="r_ga19638bd1cc1a7c7c5698a476b36b9753"><td class="memItemLeft" align="right" valign="top">typedef boost::iterator_range&lt; detail::DataElementIterator&lt; <a class="el" href="classshark_1_1_data.html">Data</a>&lt; Type &gt; &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga19638bd1cc1a7c7c5698a476b36b9753">element_range</a></td></tr>
<tr class="separator:ga19638bd1cc1a7c7c5698a476b36b9753"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacf6e101b20eb431616afae009484307d" id="r_gacf6e101b20eb431616afae009484307d"><td class="memItemLeft" align="right" valign="top">typedef boost::iterator_range&lt; detail::DataElementIterator&lt; <a class="el" href="classshark_1_1_data.html">Data</a>&lt; Type &gt; const  &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#gacf6e101b20eb431616afae009484307d">const_element_range</a></td></tr>
<tr class="separator:gacf6e101b20eb431616afae009484307d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga13c4a238cadf7bca226dee7688241a60" id="r_ga13c4a238cadf7bca226dee7688241a60"><td class="memItemLeft" align="right" valign="top">typedef detail::BatchRange&lt; <a class="el" href="classshark_1_1_data.html">Data</a>&lt; Type &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga13c4a238cadf7bca226dee7688241a60">batch_range</a></td></tr>
<tr class="separator:ga13c4a238cadf7bca226dee7688241a60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4fd89aed7a568dc704a56c1f1e6271df" id="r_ga4fd89aed7a568dc704a56c1f1e6271df"><td class="memItemLeft" align="right" valign="top">typedef detail::BatchRange&lt; <a class="el" href="classshark_1_1_data.html">Data</a>&lt; Type &gt; const  &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga4fd89aed7a568dc704a56c1f1e6271df">const_batch_range</a></td></tr>
<tr class="separator:ga4fd89aed7a568dc704a56c1f1e6271df"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ga425774be1ecd7d42c890d68fe58c3aa1" id="r_ga425774be1ecd7d42c890d68fe58c3aa1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga425774be1ecd7d42c890d68fe58c3aa1">BOOST_STATIC_CONSTANT</a> (std::size_t, DefaultBatchSize=256)</td></tr>
<tr class="memdesc:ga425774be1ecd7d42c890d68fe58c3aa1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Defines the default batch size of the Container.  <br /></td></tr>
<tr class="separator:ga425774be1ecd7d42c890d68fe58c3aa1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaddb33ca1abda79975c6b458b1cecf25e" id="r_gaddb33ca1abda79975c6b458b1cecf25e"><td class="memTemplParams" colspan="2">template&lt;class T &gt; </td></tr>
<tr class="memitem:gaddb33ca1abda79975c6b458b1cecf25e"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#gaddb33ca1abda79975c6b458b1cecf25e">operator==</a> (const <a class="el" href="classshark_1_1_data.html">Data</a>&lt; T &gt; &amp;rhs)</td></tr>
<tr class="memdesc:gaddb33ca1abda79975c6b458b1cecf25e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Two containers compare equal if they share the same data.  <br /></td></tr>
<tr class="separator:gaddb33ca1abda79975c6b458b1cecf25e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9c01641bb46faca7c6ee8fca1069cec9" id="r_ga9c01641bb46faca7c6ee8fca1069cec9"><td class="memTemplParams" colspan="2">template&lt;class T &gt; </td></tr>
<tr class="memitem:ga9c01641bb46faca7c6ee8fca1069cec9"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga9c01641bb46faca7c6ee8fca1069cec9">operator!=</a> (const <a class="el" href="classshark_1_1_data.html">Data</a>&lt; T &gt; &amp;rhs)</td></tr>
<tr class="memdesc:ga9c01641bb46faca7c6ee8fca1069cec9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Two containers compare unequal if they don't share the same data.  <br /></td></tr>
<tr class="separator:ga9c01641bb46faca7c6ee8fca1069cec9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad9b0233e3adc882ed94f418f80767b09" id="r_gad9b0233e3adc882ed94f418f80767b09"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__shark__globals.html#gacf6e101b20eb431616afae009484307d">const_element_range</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#gad9b0233e3adc882ed94f418f80767b09">elements</a> () const</td></tr>
<tr class="memdesc:gad9b0233e3adc882ed94f418f80767b09"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the range of elements.  <br /></td></tr>
<tr class="separator:gad9b0233e3adc882ed94f418f80767b09"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4d53c5d59826b9e611a19f31fcc0029d" id="r_ga4d53c5d59826b9e611a19f31fcc0029d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__shark__globals.html#ga19638bd1cc1a7c7c5698a476b36b9753">element_range</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga4d53c5d59826b9e611a19f31fcc0029d">elements</a> ()</td></tr>
<tr class="memdesc:ga4d53c5d59826b9e611a19f31fcc0029d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns therange of elements.  <br /></td></tr>
<tr class="separator:ga4d53c5d59826b9e611a19f31fcc0029d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4edf9849713708253a4d1f2d31e6187b" id="r_ga4edf9849713708253a4d1f2d31e6187b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__shark__globals.html#ga4fd89aed7a568dc704a56c1f1e6271df">const_batch_range</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga4edf9849713708253a4d1f2d31e6187b">batches</a> () const</td></tr>
<tr class="memdesc:ga4edf9849713708253a4d1f2d31e6187b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the range of batches.  <br /></td></tr>
<tr class="separator:ga4edf9849713708253a4d1f2d31e6187b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5cc5be820f0ff26a290778c23892cf47" id="r_ga5cc5be820f0ff26a290778c23892cf47"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__shark__globals.html#ga13c4a238cadf7bca226dee7688241a60">batch_range</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga5cc5be820f0ff26a290778c23892cf47">batches</a> ()</td></tr>
<tr class="memdesc:ga5cc5be820f0ff26a290778c23892cf47"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the range of batches.  <br /></td></tr>
<tr class="separator:ga5cc5be820f0ff26a290778c23892cf47"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabd82edf467b9b82f4b0a1e70fd695311" id="r_gabd82edf467b9b82f4b0a1e70fd695311"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#gabd82edf467b9b82f4b0a1e70fd695311">numberOfBatches</a> () const</td></tr>
<tr class="memdesc:gabd82edf467b9b82f4b0a1e70fd695311"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of batches of the set.  <br /></td></tr>
<tr class="separator:gabd82edf467b9b82f4b0a1e70fd695311"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga814e8b0028cc90dd2af69805e8f8a04d" id="r_ga814e8b0028cc90dd2af69805e8f8a04d"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga814e8b0028cc90dd2af69805e8f8a04d">numberOfElements</a> () const</td></tr>
<tr class="memdesc:ga814e8b0028cc90dd2af69805e8f8a04d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the total number of elements.  <br /></td></tr>
<tr class="separator:ga814e8b0028cc90dd2af69805e8f8a04d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabdfa24d4e424c86cf39851c143b2dd37" id="r_gabdfa24d4e424c86cf39851c143b2dd37"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_shape.html">Shape</a> const &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#gabdfa24d4e424c86cf39851c143b2dd37">shape</a> () const</td></tr>
<tr class="memdesc:gabdfa24d4e424c86cf39851c143b2dd37"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the shape of the elements in the dataset.  <br /></td></tr>
<tr class="separator:gabdfa24d4e424c86cf39851c143b2dd37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga241d5b9008bba26301ddcd314d3df06b" id="r_ga241d5b9008bba26301ddcd314d3df06b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_shape.html">Shape</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga241d5b9008bba26301ddcd314d3df06b">shape</a> ()</td></tr>
<tr class="memdesc:ga241d5b9008bba26301ddcd314d3df06b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the shape of the elements in the dataset.  <br /></td></tr>
<tr class="separator:ga241d5b9008bba26301ddcd314d3df06b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga372d43fb769e6ccffdb699e5e2abe5b5" id="r_ga372d43fb769e6ccffdb699e5e2abe5b5"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga372d43fb769e6ccffdb699e5e2abe5b5">empty</a> () const</td></tr>
<tr class="memdesc:ga372d43fb769e6ccffdb699e5e2abe5b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check whether the set is empty.  <br /></td></tr>
<tr class="separator:ga372d43fb769e6ccffdb699e5e2abe5b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0ea72a74a21d5ff59772516b83c4a58b" id="r_ga0ea72a74a21d5ff59772516b83c4a58b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__shark__globals.html#ga976b21a33c3947dde673463e2aa19597">element_reference</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga0ea72a74a21d5ff59772516b83c4a58b">element</a> (std::size_t i)</td></tr>
<tr class="separator:ga0ea72a74a21d5ff59772516b83c4a58b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac093b3c74d84f89898ea5c8aeb6a81a8" id="r_gac093b3c74d84f89898ea5c8aeb6a81a8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__shark__globals.html#ga9c2ebc84cb3ca390c09b6d4e32d5e7f6">const_element_reference</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#gac093b3c74d84f89898ea5c8aeb6a81a8">element</a> (std::size_t i) const</td></tr>
<tr class="separator:gac093b3c74d84f89898ea5c8aeb6a81a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga73034ee5639176b0d45e1059859d0f0a" id="r_ga73034ee5639176b0d45e1059859d0f0a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__shark__globals.html#ga79217da1dd034aa18bc553f483e9449c">batch_reference</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga73034ee5639176b0d45e1059859d0f0a">batch</a> (std::size_t i)</td></tr>
<tr class="separator:ga73034ee5639176b0d45e1059859d0f0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7222ee2998a5032cd2b07c86032e7663" id="r_ga7222ee2998a5032cd2b07c86032e7663"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__shark__globals.html#gab8037000e57c8d73273e1323ec2efe72">const_batch_reference</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga7222ee2998a5032cd2b07c86032e7663">batch</a> (std::size_t i) const</td></tr>
<tr class="separator:ga7222ee2998a5032cd2b07c86032e7663"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaecdfa51025bbadcfb6db99f292df82ea" id="r_gaecdfa51025bbadcfb6db99f292df82ea"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#gaecdfa51025bbadcfb6db99f292df82ea">Data</a> ()</td></tr>
<tr class="memdesc:gaecdfa51025bbadcfb6db99f292df82ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor which constructs an empty set.  <br /></td></tr>
<tr class="separator:gaecdfa51025bbadcfb6db99f292df82ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga08ec5cfa49cf4ac1a5ce0ca021eb0e29" id="r_ga08ec5cfa49cf4ac1a5ce0ca021eb0e29"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga08ec5cfa49cf4ac1a5ce0ca021eb0e29">Data</a> (std::size_t numBatches)</td></tr>
<tr class="memdesc:ga08ec5cfa49cf4ac1a5ce0ca021eb0e29"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a dataset with empty batches.  <br /></td></tr>
<tr class="separator:ga08ec5cfa49cf4ac1a5ce0ca021eb0e29"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaddfe0e46341e78aa2c2c894b54ddc806" id="r_gaddfe0e46341e78aa2c2c894b54ddc806"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#gaddfe0e46341e78aa2c2c894b54ddc806">Data</a> (std::size_t size, element_type const &amp;<a class="el" href="group__shark__globals.html#ga0ea72a74a21d5ff59772516b83c4a58b">element</a>, std::size_t <a class="el" href="namespaceshark.html#af2ab10364feb8a631e0866dcf2f1a4ad">batchSize</a>=DefaultBatchSize)</td></tr>
<tr class="memdesc:gaddfe0e46341e78aa2c2c894b54ddc806"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construction with size and a single element.  <br /></td></tr>
<tr class="separator:gaddfe0e46341e78aa2c2c894b54ddc806"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gade09075aa5a3e014a4204d5589f0012c" id="r_gade09075aa5a3e014a4204d5589f0012c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#gade09075aa5a3e014a4204d5589f0012c">read</a> (<a class="el" href="namespaceshark.html#ada68729491840669e47c8ad42282424f">InArchive</a> &amp;archive)</td></tr>
<tr class="memdesc:gade09075aa5a3e014a4204d5589f0012c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read the component from the supplied archive.  <br /></td></tr>
<tr class="separator:gade09075aa5a3e014a4204d5589f0012c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga85030a0dabab1040989d82ae78dd98be" id="r_ga85030a0dabab1040989d82ae78dd98be"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga85030a0dabab1040989d82ae78dd98be">write</a> (<a class="el" href="namespaceshark.html#af4f8eb8e9618f5236b71bbcb12b8a524">OutArchive</a> &amp;archive) const</td></tr>
<tr class="memdesc:ga85030a0dabab1040989d82ae78dd98be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write the component to the supplied archive.  <br /></td></tr>
<tr class="separator:ga85030a0dabab1040989d82ae78dd98be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga35fb8d4c0cbc2a8bef9ebd974e0cf0fa" id="r_ga35fb8d4c0cbc2a8bef9ebd974e0cf0fa"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga35fb8d4c0cbc2a8bef9ebd974e0cf0fa">makeIndependent</a> ()</td></tr>
<tr class="memdesc:ga35fb8d4c0cbc2a8bef9ebd974e0cf0fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method makes the vector independent of all siblings and parents.  <br /></td></tr>
<tr class="separator:ga35fb8d4c0cbc2a8bef9ebd974e0cf0fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf9900fbc117dd6259136a3dd2056c11e" id="r_gaf9900fbc117dd6259136a3dd2056c11e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#gaf9900fbc117dd6259136a3dd2056c11e">splitBatch</a> (std::size_t <a class="el" href="group__shark__globals.html#ga73034ee5639176b0d45e1059859d0f0a">batch</a>, std::size_t elementIndex)</td></tr>
<tr class="separator:gaf9900fbc117dd6259136a3dd2056c11e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaabc1f57dc805faf96d59ab1ff6d4a171" id="r_gaabc1f57dc805faf96d59ab1ff6d4a171"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_data.html">Data</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#gaabc1f57dc805faf96d59ab1ff6d4a171">splice</a> (std::size_t <a class="el" href="group__shark__globals.html#ga73034ee5639176b0d45e1059859d0f0a">batch</a>)</td></tr>
<tr class="memdesc:gaabc1f57dc805faf96d59ab1ff6d4a171"><td class="mdescLeft">&#160;</td><td class="mdescRight">Splits the container into two independent parts. The front part remains in the container, the back part is returned.  <br /></td></tr>
<tr class="separator:gaabc1f57dc805faf96d59ab1ff6d4a171"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga55cb071b82f9cfd984a855eddb9bf51e" id="r_ga55cb071b82f9cfd984a855eddb9bf51e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga55cb071b82f9cfd984a855eddb9bf51e">append</a> (<a class="el" href="classshark_1_1_data.html">Data</a> const &amp;other)</td></tr>
<tr class="memdesc:ga55cb071b82f9cfd984a855eddb9bf51e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Appends the contents of another data object to the end.  <br /></td></tr>
<tr class="separator:ga55cb071b82f9cfd984a855eddb9bf51e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadbf9ee4b9fcc8d6ae46467b3fd7721ad" id="r_gadbf9ee4b9fcc8d6ae46467b3fd7721ad"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#gadbf9ee4b9fcc8d6ae46467b3fd7721ad">push_back</a> (<a class="el" href="group__shark__globals.html#gab8037000e57c8d73273e1323ec2efe72">const_batch_reference</a> <a class="el" href="group__shark__globals.html#ga73034ee5639176b0d45e1059859d0f0a">batch</a>)</td></tr>
<tr class="separator:gadbf9ee4b9fcc8d6ae46467b3fd7721ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga43280de21c8ba42f381a555cd8f367fe" id="r_ga43280de21c8ba42f381a555cd8f367fe"><td class="memTemplParams" colspan="2">template&lt;class Range &gt; </td></tr>
<tr class="memitem:ga43280de21c8ba42f381a555cd8f367fe"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga43280de21c8ba42f381a555cd8f367fe">repartition</a> (Range const &amp;batchSizes)</td></tr>
<tr class="memdesc:ga43280de21c8ba42f381a555cd8f367fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reorders the batch structure in the container to that indicated by the batchSizes vector.  <br /></td></tr>
<tr class="separator:ga43280de21c8ba42f381a555cd8f367fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2ee51d83d9a5db03a3a9a1b0607ae696" id="r_ga2ee51d83d9a5db03a3a9a1b0607ae696"><td class="memItemLeft" align="right" valign="top">std::vector&lt; std::size_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga2ee51d83d9a5db03a3a9a1b0607ae696">getPartitioning</a> () const</td></tr>
<tr class="memdesc:ga2ee51d83d9a5db03a3a9a1b0607ae696"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a vector with the batch sizes of every batch.  <br /></td></tr>
<tr class="separator:ga2ee51d83d9a5db03a3a9a1b0607ae696"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga42c8e836dbb5860d4044d8b19732f794" id="r_ga42c8e836dbb5860d4044d8b19732f794"><td class="memTemplParams" colspan="2">template&lt;class Range &gt; </td></tr>
<tr class="memitem:ga42c8e836dbb5860d4044d8b19732f794"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga42c8e836dbb5860d4044d8b19732f794">reorderElements</a> (Range const &amp;indices)</td></tr>
<tr class="memdesc:ga42c8e836dbb5860d4044d8b19732f794"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reorders elements across batches.  <br /></td></tr>
<tr class="separator:ga42c8e836dbb5860d4044d8b19732f794"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa2d2689f5da9dbd4eac362d3c03ebcaf" id="r_gaa2d2689f5da9dbd4eac362d3c03ebcaf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#gaa2d2689f5da9dbd4eac362d3c03ebcaf">indexedSubset</a> (<a class="el" href="group__shark__globals.html#ga3765fd3c920db97545a11dca09b75224">IndexSet</a> const &amp;indices, <a class="el" href="classshark_1_1_data.html">Data</a> &amp;<a class="el" href="group__shark__globals.html#ga420a47af92d8da0f5e95a7d158521db9">subset</a>, <a class="el" href="classshark_1_1_data.html">Data</a> &amp;complement) const</td></tr>
<tr class="memdesc:gaa2d2689f5da9dbd4eac362d3c03ebcaf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fill in the subset defined by the list of indices as well as its complement.  <br /></td></tr>
<tr class="separator:gaa2d2689f5da9dbd4eac362d3c03ebcaf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6bc854de0b085583688f1d089fa608b6" id="r_ga6bc854de0b085583688f1d089fa608b6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_data.html">Data</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga6bc854de0b085583688f1d089fa608b6">indexedSubset</a> (<a class="el" href="group__shark__globals.html#ga3765fd3c920db97545a11dca09b75224">IndexSet</a> const &amp;indices) const</td></tr>
<tr class="separator:ga6bc854de0b085583688f1d089fa608b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_i_serializable"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_i_serializable')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_i_serializable.html">shark::ISerializable</a></td></tr>
<tr class="memitem:a7baa9ce108d7278822297ce15882782a inherit pub_methods_classshark_1_1_i_serializable" id="r_a7baa9ce108d7278822297ce15882782a"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a7baa9ce108d7278822297ce15882782a">~ISerializable</a> ()</td></tr>
<tr class="memdesc:a7baa9ce108d7278822297ce15882782a inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual d'tor.  <br /></td></tr>
<tr class="separator:a7baa9ce108d7278822297ce15882782a inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abdda0c5b8e065b8afbac2cba8f58e841 inherit pub_methods_classshark_1_1_i_serializable" id="r_abdda0c5b8e065b8afbac2cba8f58e841"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#abdda0c5b8e065b8afbac2cba8f58e841">load</a> (<a class="el" href="namespaceshark.html#ada68729491840669e47c8ad42282424f">InArchive</a> &amp;archive, unsigned int version)</td></tr>
<tr class="memdesc:abdda0c5b8e065b8afbac2cba8f58e841 inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Versioned loading of components, calls read(...).  <br /></td></tr>
<tr class="separator:abdda0c5b8e065b8afbac2cba8f58e841 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bf66fa8db15cc529bec98976a2f5255 inherit pub_methods_classshark_1_1_i_serializable" id="r_a5bf66fa8db15cc529bec98976a2f5255"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a5bf66fa8db15cc529bec98976a2f5255">save</a> (<a class="el" href="namespaceshark.html#af4f8eb8e9618f5236b71bbcb12b8a524">OutArchive</a> &amp;archive, unsigned int version) const</td></tr>
<tr class="memdesc:a5bf66fa8db15cc529bec98976a2f5255 inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Versioned storing of components, calls write(...).  <br /></td></tr>
<tr class="separator:a5bf66fa8db15cc529bec98976a2f5255 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4560a94e8f4908fe8627e41e7d965735 inherit pub_methods_classshark_1_1_i_serializable" id="r_a4560a94e8f4908fe8627e41e7d965735"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a4560a94e8f4908fe8627e41e7d965735">BOOST_SERIALIZATION_SPLIT_MEMBER</a> ()</td></tr>
<tr class="separator:a4560a94e8f4908fe8627e41e7d965735 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-types" name="pro-types"></a>
Protected Types</h2></td></tr>
<tr class="memitem:ga9ef593d49b903835ca9f5f717a701154" id="r_ga9ef593d49b903835ca9f5f717a701154"><td class="memItemLeft" align="right" valign="top">typedef detail::SharedContainer&lt; Type &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga9ef593d49b903835ca9f5f717a701154">Container</a></td></tr>
<tr class="separator:ga9ef593d49b903835ca9f5f717a701154"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-attribs" name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:ga2296f2d35aff4d00d07a5d6c99015197" id="r_ga2296f2d35aff4d00d07a5d6c99015197"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__shark__globals.html#ga9ef593d49b903835ca9f5f717a701154">Container</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga2296f2d35aff4d00d07a5d6c99015197">m_data</a></td></tr>
<tr class="memdesc:ga2296f2d35aff4d00d07a5d6c99015197"><td class="mdescLeft">&#160;</td><td class="mdescRight">data  <br /></td></tr>
<tr class="separator:ga2296f2d35aff4d00d07a5d6c99015197"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga232e64c2421cd25794c915c399a7cfd5" id="r_ga232e64c2421cd25794c915c399a7cfd5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_shape.html">Shape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga232e64c2421cd25794c915c399a7cfd5">m_shape</a></td></tr>
<tr class="memdesc:ga232e64c2421cd25794c915c399a7cfd5"><td class="mdescLeft">&#160;</td><td class="mdescRight">shape of a datapoint  <br /></td></tr>
<tr class="separator:ga232e64c2421cd25794c915c399a7cfd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="friends" name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:gaa882479ecf9824c056c73aa0a444b879" id="r_gaa882479ecf9824c056c73aa0a444b879"><td class="memTemplParams" colspan="2">template&lt;class InputT , class LabelT &gt; </td></tr>
<tr class="memitem:gaa882479ecf9824c056c73aa0a444b879"><td class="memTemplItemLeft" align="right" valign="top">class&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#gaa882479ecf9824c056c73aa0a444b879">LabeledData</a></td></tr>
<tr class="separator:gaa882479ecf9824c056c73aa0a444b879"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga54bdb86caca27a90ce28a8043fe4bced" id="r_ga54bdb86caca27a90ce28a8043fe4bced"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shark__globals.html#ga54bdb86caca27a90ce28a8043fe4bced">swap</a> (<a class="el" href="classshark_1_1_data.html">Data</a> &amp;a, <a class="el" href="classshark_1_1_data.html">Data</a> &amp;b)</td></tr>
<tr class="separator:ga54bdb86caca27a90ce28a8043fe4bced"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;class Type&gt;<br />
class shark::Data&lt; Type &gt;</div><p><a class="el" href="classshark_1_1_data.html" title="Data container.">Data</a> container. </p>
<p>The <a class="el" href="classshark_1_1_data.html" title="Data container.">Data</a> class is <a class="el" href="classshark_1_1_shark.html" title="Allows for querying compile settings at runtime. Provides the current command line arguments to the r...">Shark</a>'s container for machine learning data. This container (and its sub-classes) is used for input data, labels, and model outputs.</p>
<dl class="section user"><dt></dt><dd>The <a class="el" href="classshark_1_1_data.html" title="Data container.">Data</a> container organizes the data it holds in batches. This means, that it tries to find a good data representation for a whole set of, for example 100 data points, at the same time. If the type of data it stores is for example RealVector, the batches of this type are RealMatrices. This is good because most often operations on the whole matrix are faster than operations on the separate vectors. Nearly all operations of the set have to be interpreted in terms of the batch. Therefore the iterator interface will give access to the batches but not to single elements. For this separate element_iterators and const_element_iterators can be used. </dd></dl>
<dl class="section user"><dt></dt><dd>When you need to explicitely iterate over all elements, you can use: <div class="fragment"><div class="line"> <a class="code hl_class" href="classshark_1_1_data.html" title="Data container.">Data&lt;RealVector&gt;</a> data;</div>
<div class="line"> <span class="keywordflow">for</span>(<span class="keyword">auto</span> elem: data.<a class="code hl_function" href="group__shark__globals.html#gad9b0233e3adc882ed94f418f80767b09" title="Returns the range of elements.">elements</a>()){</div>
<div class="line">     std::cout&lt;&lt;*pos&lt;&lt;<span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line">     <span class="keyword">auto</span> ref=*pos;</div>
<div class="line">     ref*=2;</div>
<div class="line">     std::cout&lt;&lt;*pos&lt;&lt;std::endl;</div>
<div class="line">}</div>
</div><!-- fragment --> </dd></dl>
<dl class="section user"><dt></dt><dd>Element wise accessing of elements is usually slower than accessing the batches. If possible, use direct batch access, or at least use the iterator interface or the for loop above to iterate over all elements. Random access to single elements is linear time, so use it wisely. Of course, when you want to use batches, you need to know the actual batch type. This depends on the actual type of the input. here are the rules: if the input is an arithmetic type like int or double, the result will be a vector of this (i.e. double-&gt;RealVector or Int-&gt;IntVector). For vectors the results are matrices as mentioned above. If the vector is sparse, so is the matrix. And for everything else the batch type is just a std::vector of the type, so no optimization can be applied. </dd></dl>
<dl class="section user"><dt></dt><dd>When constructing the container the batchSize can be set. If it is not set by the user the default batchSize is chosen. A BatchSize of 0 corresponds to putting all data into a single batch. Beware that not only the data needs storage but also the various models during computation. So the actual amount of space to compute a batch can greatly exceed the batch size.</dd></dl>
<p>An additional feature of the <a class="el" href="classshark_1_1_data.html" title="Data container.">Data</a> class is that it can be used to create lazy subsets. So the batches of a dataset can be shared between various instances of the data class without additional memory overhead.</p>
<dl class="section warning"><dt>Warning</dt><dd>Be aware &ndash;especially for derived containers like <a class="el" href="classshark_1_1_labeled_data.html" title="Data set for supervised learning.">LabeledData</a>&ndash; that the set does not enforce structural consistency. When you change the structure of the data part for example by directly changing the size of the batches, the size of the labels is not enforced to change accordingly. Also when creating subsets of a set changing the parent will change it's siblings and conversely. The programmer needs to ensure structural integrity! For example this is dangerous: <div class="fragment"><div class="line"><span class="keywordtype">void</span> function(<a class="code hl_class" href="classshark_1_1_data.html" title="Data container.">Data&lt;unsigned int&gt;</a>&amp; data){</div>
<div class="line">     <a class="code hl_class" href="classshark_1_1_data.html" title="Data container.">Data&lt;unsigned int&gt;</a> newData(...);</div>
<div class="line">     data=newData;</div>
<div class="line">}</div>
</div><!-- fragment --> When data was originally a labeledData object, and newData has a different batch structure than data, this will lead to structural inconsistencies. When function is rewritten such that newData has the same structure as data, this code is perfectly fine. The best way to get around this problem is by rewriting the code as: <div class="fragment"><div class="line"><a class="code hl_class" href="classshark_1_1_data.html" title="Data container.">Data&lt;unsigned int&gt;</a> function(){</div>
<div class="line">     <a class="code hl_class" href="classshark_1_1_data.html" title="Data container.">Data&lt;unsigned int&gt;</a> newData(...);</div>
<div class="line">     <span class="keywordflow">return</span> newData;</div>
<div class="line">}</div>
</div><!-- fragment --> </dd></dl>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000001">Todo:</a></b></dt><dd>expand docu </dd></dl>

<p class="definition">Definition at line <a class="el" href="_dataset_8h_source.html#l00128">128</a> of file <a class="el" href="_dataset_8h_source.html">Dataset.h</a>.</p>
</div><hr/>The documentation for this class was generated from the following file:<ul>
<li>include/shark/Data/<a class="el" href="_dataset_8h_source.html">Dataset.h</a></li>
</ul>
</div><!-- contents -->
</div>
</body>
</html>
